(() => {
    let a10: 10
    a10 = 10


    let b: 'male' | 'female'
    b = 'female'

    let c: boolean | string
    c = true
    c = 'abc'


    // 隐式any
    let d
    d = 1
    d = 'a'

    let e: unknown
    e = "abc"
    // unknown 与 any的区别：
    // unknown 不能赋值给其他类型
    // any 能赋值任何类型


    let f: string
    // 断言
    f = e as string
    f = <string>e

    function fn(): void {
        return undefined
    }

    function fn1(): never {
        throw new Error('msg')
    }
})()
